namespace Expect.Documentation.Fixtures_reference
{
    using System;
    using Expect.Core;
    using Expect.Core.Fixtures;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    
    
    // This file is generated, if you modify content you will lose your modifications when the generator will regenerate the file
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Expect.Core", "0.5.2.0")]
    [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [TestClass()]
    [SpecificationContainerAttribute(Name="ColumnFixture", Path="\\Fixtures reference\\ColumnFixture.expect")]
    public partial class ColumnFixtureContainer : Expect.Core.AbstractSpecificationContainer
    {
        
        partial void PrepareContextExtension();
        
        partial void BeforeInitExtension();
        
        partial void AfterInitExtension();
        
        partial void BeforeTeardownExtension();
        
        partial void AfterTeardownExtension();
        
#line 1 "ColumnFixture.expect"
#line hidden
        
        public override void InitializeContext()
        {
            base.InitializeContext();
            PrepareContextExtension();
        }
        
        [TestInitialize()]
        public virtual void ColumnFixtureClass_TestInit()
        {
            InitializeContext();
            BeforeInit();
            BeforeInitExtension();

            SpecificationDefinition spec = new SpecificationDefinition();
            spec.CalculateResult();

            if ((spec.Status.Success.HasValue == false))
            {
                Assert.Inconclusive(spec.GetMessageForInconclusiveResult());
            }
            if ((spec.Status.Success.Value == false))
            {
                Assert.Fail(spec.GetMessageForFailedResult());
            }

            AfterInit();
            AfterInitExtension();
        }
        
        [TestCleanup()]
        public virtual void ColumnFixtureClass_TestTeardown()
        {
            BeforeTeardown();
            BeforeTeardownExtension();

            SpecificationDefinition spec = new SpecificationDefinition();
            spec.CalculateResult();

            if ((spec.Status.Success.HasValue == false))
            {
                Assert.Inconclusive(spec.GetMessageForInconclusiveResult());
            }
            if ((spec.Status.Success.Value == false))
            {
                Assert.Fail(spec.GetMessageForFailedResult());
            }

            AfterTeardown();
            AfterTeardownExtension();
        }
        
        // TestComment
        [TestMethod()]
        public virtual void ColumnFixture()
        {
            SpecificationDefinition spec = new SpecificationDefinition();
            Get_ColumnFixture(spec);
            spec.CalculateResult();

            if ((spec.Status.Success.HasValue == false))
            {
                Assert.Inconclusive(spec.GetMessageForInconclusiveResult());
            }
            if ((spec.Status.Success.Value == false))
            {
                Assert.Fail(spec.GetMessageForFailedResult());
            }
        }
        
        [SpecificationProviderAttribute(Name="ColumnFixture")]
        public virtual void Get_ColumnFixture(Expect.Core.SpecificationDefinition spec)
        {
            spec.Context = Context;
            spec.Name = "ColumnFixture";
            FixtureDefinition fixture = null;

            fixture = spec.AddFixture<DescriptionFixture>();
#line 1
            fixture.WithRow("This fixture is intended to treat data as a table. Each column is mapped to a pro" +
                    "perty in the fixture that matches the column name.");
#line 2
            fixture.WithRow("!For example :!");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture();
#line 3
            fixture.WithRow("A simple ColumnFixture that makes additions");
#line 4
            fixture.WithRow("Field 1", "Field 2", "Field 3", "Result");
#line 5
            fixture.WithRow("1", "1", "1", "3");
#line 6
            fixture.WithRow("2", "2", "5", "9");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture<DescriptionFixture>();
#line 7
            fixture.WithRow("In your fixture implementation, you could override the AfterRun method to provide" +
                    " custom logic. The AfterRun method is called after the propoerties have been pop" +
                    "ulated.");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture<DescriptionFixture>();
#line 10
            fixture.WithRow("*ColumnFixture* have a little more functionnalities. If you end a column name wit" +
                    "h \"?\" or \"()\", the ColumnFixture will look for a method that matches the column " +
                    "name, and will compare the result of the method to the content of the cell.");
#line 11
            fixture.WithRow("In addition, if you leave a cell blank, ColumnFixture will keep the previous valu" +
                    "e of the column.");
#line 12
            fixture.WithRow("!For example :!");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture();
#line 13
            fixture.WithRow("A more complex ColumnFixture that makes additions");
#line 14
            fixture.WithRow("Field 1", "Field 2", "Field 3", "Result?");
#line 15
            fixture.WithRow("1", "1", "1", "3");
#line 16
            fixture.WithRow("", "2", "", "4");
#line 17
            fixture.WithRow("", "3", "", "5");
#line 18
            fixture.WithRow("2", "3", "4", "9");
#line hidden
            fixture.EndRun();

        }
    }
}
